function dee(x) {
	var flag = false;
	var div1 = document.getElementById("jus");
	var box =  document.getElementsByName("cks");

	var table1 = document.getElementsByName("tvb");
	var xmlhttp = new XMLHttpRequest();
	var tt = "";
    alert("=====")
	if (x==1) {
		for (var i = 0; i < box.length; i++) {
			if (box[i].checked) {
				tt += box[i].value + ":";
				flag = true;
			}
		}
		if (flag == false) {
			alert("请先勾选");
			return;
		}

		xmlhttp.onreadystatechange=function() {
			if (xmlhttp.readyState==4 && xmlhttp.status==200) {

                var str=xmlhttp.responseText;
                if(str=="ok") {
					for (var i = 0; i < box.length; i++) {
						if (box[i].checked) {
                        	div1.removeChild(table1[i]);
						}
					}
				}
			}
		}


		xmlhttp.open("get","/GuoShuShangCheng/order/delete?tt="+tt,true);
		xmlhttp.send();

	} else {
		for (var i = 0; i<box.length; i++) {
			tt += box[i].value + ":";
		}
		xmlhttp.onreadystatechange = function() {
			if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {
				var str = xmlhttp.responseText;
				if (str=="ok") {
					for (var i = 0; i<box.length; i++) {
						div1.removeChild(table1[i]);

					}
				}
			}
		}

		xmlhttp.open("get", "/GuoShuShangChengn/order/delete?tt="+tt, true);
		xmlhttp.send();

	}
}

   



